<!doctype html>
<html>
<head>
<title>管理角色列表页面</title>
    <?php $this->load->module('admin/index/page_header');?>
<link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
</head>
<body>

<div class="wrap J_check_wrap">
  <div class="nav">
      <ul>
          <li class="current"><a href="<?php echo site_url('admin/adminrole/index')?>">角色管理</a></li> 
          <li><a href="<?php echo site_url('admin/adminrole/add')?>">添加角色</a></li>    
      </ul>
  </div>
  <form method="post" action="">
    <div class="table_list" id="content">
      <table width="100%" data-uri="<?php echo site_url('admin/adminrole/ajax_status');?>">
        <thead>
		    <tr>
		        <td style="width:2%;">选择</td>
		        <td style="width:8%;">操作</td>
		        <td style="width:8%;">角色名称</td>
		        <td style="width:8%;">角色描述</td>
		        <td style="width:8%;">添加时间</td>
		        <td style="width:8%;">状态</td>
		    </tr>
        </thead>
	    <?php if($list):?>
	    <tbody>
	        <?php foreach($list as $val):?>
	        <tr>
		        <td style="width:2%;">
		        <?php if($val['id']==1):?>			        
		        <?php else:?>
		        <input type="checkbox" value="<?php echo $val['id'];?>" name="id[]">
		        <?php endif;?>
		        </td>
		        <td style="width:4%" class="btn_min">
		            <?php if($val['id']==1):?>
		            <?php else:?>
		            <div class="operat hidden">
		                <a class="icon-cog action" href="javascript:;">处理</a>
		                <div class="menu_select">
		                    <ul>
		                        <li><a class="icon-pencil" href="<?php echo $val['edit_url'];?>">编辑</a></li>			                        
		                        <li><a class="icon-remove-2 doDel" href="javascript:;" data-uri="<?php echo $val['remove_url'];?>">删除</a></li>
		                        <li><a class="icon-power-cord" href="<?php echo $val['author_url'];?>">设置权限</a></li>
		                    </ul>
		                </div>
		            </div>
		            <?php endif;?>
		        </td>
		        <td><?php echo $val['name'];?></td>
		        <td style="width:4%;"><?php echo $val['remark'];?></td>
		        <td style="width:4%;"><?php echo $val['add_time'];?></td>
		        <td style="width:4%;">
		        <img class="pointer" data-id="<?php echo $val['id'];?>" style="cursor: pointer;" data-field="status" data-value="<?php echo $val['status'];?>" src="<?php echo URLPRE;?>static/admin/images/icons/icon_<?php echo $val['status'];?>.png" /></td>
	        </tr>
	        <?php endforeach;?>
	    </tbody>
	    <?php endif;?>
      </table>
    </div>
    <div class="btn_wrap">
      <div class="btn_wrap_pd">
      	<label class="mr20"><input class="icon-checkbox-checked icon-checkbox-unchecked" type="checkbox" title="全选" onclick="tools_select('id[]',this)" />全选</label>
        <button type="button" class="btn J_ajax_submit_btn" onclick="tools_submit({action:'<?php echo site_url('admin/adminrole/ajax_remove');?>',msg:'确定要删除该信息么?'})">删除</button>
	    <span class="fr">
	    <button type="button" id="condition"  class="btn icon-search">筛选条件</button>
	    <input id="condition_input" type="hidden" name="condition" value="<?php echo $condition;?>" />
	    </span>
      </div>
    </div>
  </form>
  <div class="page_nav">
  <?php echo $this->mypageclass->show(1); ?>
  </div>
</div>
<script type="text/javascript">
$(function(){
    
    $("#condition").on("click",function(){
    	$("body").Condition({
			input:"#condition_input",
			okVal:'高级搜索',
			callback:function(data){tools_submit({action:'<?php echo site_url('admin/adminrole/index');?>'});
			},
			data:{
				name:{name:'角色名称'},
			}
    	})
    }); 
})
</script>
</body>
</html>